<template>
  <div>
    <van-nav-bar
      :title="name"
      left-text=""
      left-arrow
      @click-left="onClickLeft"
    >
      <template #right>
        <van-icon
          name="wap-home-o"
          size="26"
          color="black"
          @click="handleClick"
        />
      </template>
    </van-nav-bar>
  </div>
</template>
<script>
import { useRouter } from 'vue-router';
export default {
    setup() {
      const router=useRouter();
    const onClickLeft = () => history.back();
    const handleClick=()=>router.push('/show');
    return {
      onClickLeft,
      handleClick
    };
  },
    props:['name'],
    onBeforeUnmounted(){
        window.onscroll=null
    }
};
</script>
<style lang="scss" scoped>
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 44px;
  line-height: 44px;
  background: #000;
}
</style>
}
<style lang="scss">
.van-nav-bar .van-icon {
  font-size: 26px;
  font-weight: 500;
  color: black;
}
.van-nav-bar__title {
  font-weight: 600;
}
</style>
